package com.luyuan.crm.sale.service.impl;

import java.util.List;

import com.luyuan.crm.sale.model.OrderProduct;
import com.luyuan.crm.sale.service.OrderProductService;
import com.ruijie.foundation.dao.support.HibernateEntityDao;
import com.ruijie.foundation.query.Page;
import com.ruijie.foundation.query.criteria.CriteriaQueryTemplate;
import com.ruijie.foundation.query.criteria.CriteriaTemplate;

public class OrderProductServiceImpl extends HibernateEntityDao<OrderProduct> implements OrderProductService {

    @Override
    public void removeOrderProduct(OrderProduct orderProduct) {
        super.remove(orderProduct);
    }

    @Override
    public Page pagedQuery(CriteriaTemplate criteria, int pageNo, int pageSize,
            List<org.hibernate.criterion.Order> orders) {
        CriteriaQueryTemplate cqt = new CriteriaQueryTemplate(getSessionFactory());
        return cqt.pagedQuery(criteria, pageNo, pageSize, orders);
    }

}
